package persistence;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the Firm_has_Accounts database table.
 * 
 */
@Embeddable
public class Firm_has_AccountPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;
	private int firm_idFirm;
	private int firm_crd;
	private int accounts_idAccounts;

    public Firm_has_AccountPK() {
    }

	@Column(name="Firm_idFirm")
	public int getFirm_idFirm() {
		return this.firm_idFirm;
	}
	public void setFirm_idFirm(int firm_idFirm) {
		this.firm_idFirm = firm_idFirm;
	}

	@Column(name="Firm_crd")
	public int getFirm_crd() {
		return this.firm_crd;
	}
	public void setFirm_crd(int firm_crd) {
		this.firm_crd = firm_crd;
	}

	@Column(name="Accounts_idAccounts")
	public int getAccounts_idAccounts() {
		return this.accounts_idAccounts;
	}
	public void setAccounts_idAccounts(int accounts_idAccounts) {
		this.accounts_idAccounts = accounts_idAccounts;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof Firm_has_AccountPK)) {
			return false;
		}
		Firm_has_AccountPK castOther = (Firm_has_AccountPK)other;
		return 
			(this.firm_idFirm == castOther.firm_idFirm)
			&& (this.firm_crd == castOther.firm_crd)
			&& (this.accounts_idAccounts == castOther.accounts_idAccounts);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.firm_idFirm;
		hash = hash * prime + this.firm_crd;
		hash = hash * prime + this.accounts_idAccounts;
		
		return hash;
    }
}